<template>
	<div id="contentBox">
		<div class="searchBox">
			<el-form :inline="true"  ref="searchForm"  :model="searchForm" label-width="96px">
	            <el-form-item label="订单号" prop="orderNumber" >
				    <el-input v-model="searchForm.orderNumber" placeholder="请输入搜索内容..."  @input.native="debounceSeach"></el-input >
				</el-form-item>
				<el-form-item label="经销商名称" prop="dealerName" >
				    <el-input v-model="searchForm.dealerName" placeholder="请输入搜索内容..."  @input.native="debounceSeach"></el-input >
				</el-form-item>
				 <el-form-item label="车架号" prop="vin" >
				    <el-input v-model="searchForm.vin" placeholder="请输入搜索内容..."  @input.native="debounceSeach"></el-input >
				</el-form-item>
				<el-form-item label="汽车车型" prop="carName">
				  	<el-input v-model="searchForm.carName" placeholder="请输入搜索内容..." @input.native="debounceSeach"></el-input >
			    </el-form-item>
	            <el-form-item label="提车状态" prop="logisticsFollowStatus">				   
				    <el-select v-model="searchForm.logisticsFollowStatus" placeholder="请选择提车状态" @change="debounceSeach">
				    	<el-option label="请选择提车状态" value=""></el-option>			   
				    	<el-option v-for="(item, index) in followStatusMap" :label="item" :value="index" :key="index"></el-option>
					</el-select>
				</el-form-item>
				<el-form-item label="准入库状态" prop="waitStockStatus">				   
				    <el-select v-model="searchForm.waitStockStatus" placeholder="请选择准入库状态" @change="debounceSeach">
				    	<el-option label="请选择准入库状态" value=""></el-option>			   
				    	<el-option v-for="(item, index) in waitStatusMap" :label="item" :value="index" :key="index"></el-option>
					</el-select>
				</el-form-item>
				<el-form-item style="margin-bottom: 10px;">				    
				    <el-button @click="resetSearchForm('searchForm')">重置</el-button>
				</el-form-item>
			</el-form>
		</div>
		<div id="tableBox" style="margin:0 25px;" >
			<el-table :data="tableData.data" border  >
			    <el-table-column label="订单号" width="140" >
			      <template scope="scope">
			        <span >{{ scope.row.orderNumber }}</span>
			      </template>
			    </el-table-column>
			    <el-table-column label="经销商名称" min-width="200">
			      <template scope="scope">
			        <span >{{ scope.row.dealerName }}</span>
			      </template>
			    </el-table-column>
			    
			    <el-table-column label="汽车车型" min-width="300">
			      <template scope="scope">
			        <span >{{ scope.row.carName }}</span>
			      </template>
			    </el-table-column>
			    <el-table-column label="汽车数量" width="100">
			      <template scope="scope">
			        <span >{{ scope.row.amount }}</span>
			      </template>
			    </el-table-column>
			    <el-table-column label="车架号" min-width="300">
			      <template scope="scope">
			        <span >{{ scope.row.vin }}</span>
			      </template>
			    </el-table-column>
			    <el-table-column label="提车状态" width="120">
			      <template scope="scope">
			        <span >{{ followStatusMap[scope.row.logisticsFollowStatus] }}</span>
			      </template>
			    </el-table-column>
			    <el-table-column label="准入库状态" width="120">
			      <template scope="scope">
			        <span >{{ waitStatusMap[scope.row.waitStockStatus] }}</span>
			      </template>
			    </el-table-column>
			   
			    <el-table-column label="操作" width="150" >
			      <template scope="scope">
			      	<el-button v-if="scope.row.logisticsFollowStatus!=0" size="small" @click="handleSee(scope.$index, scope.row)">查看</el-button>
			      	<el-button v-if="scope.row.logisticsFollowStatus!=2" size="small" 
			      	@click="handleEdit(scope.$index, scope.row,true)">新建</el-button>		      	
			      	<el-button v-if="scope.row.waitStockStatus==1" size="small" 
			      	@click="inStock(scope.$index, scope.row,true)">准入库</el-button>
			      </template>
			    </el-table-column>
			</el-table>
            <el-dialog  title="提车跟踪管理" v-if="dialogSendData.dialogFormVisible" :visible.sync="dialogSendData.dialogFormVisible"  :lock-scroll='true' top=5% :close-on-click-modal="false" :close-on-press-escape="false">
				<dialogForm :dialogSendData="dialogSendData" :tableData="tableData" v-on:refreshTableData="seachData"></dialogForm>
			</el-dialog>
	    </div>
	    <div class="block" style="text-align: center;margin-top: 15px;">
		    <pagination v-on:refreshSeachData="seachData"  :tableData="tableData" :searchForm="searchForm"></pagination>
		</div>
	</div>
</template>
<script src="./index.js">

</script>
<style scoped lang="stylus" rel="styleheet/stylus">
	@import './index.styl';
</style>